IOMMU VTD BUG: disable Extended Interrupt Mode when disabling Interrupt Remapping
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Jun 2011 12:04:09 +0000 (13:04 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Jun 2011 12:04:09 +0000 (13:04 +0100)
commit4e9144664327f34764c5625734cc21d40201ebfb
tree29d076b740c34a30239775c7ed06e81faa256d15
parentef41e4fb40fd8cb8dfcb19e488d1a7a647c8810d
IOMMU VTD BUG: disable Extended Interrupt Mode when disabling Interrupt Remapping

Experimental evidence shows that Extended Interrupt Mode remains in
effect even after Interrupt Remapping is disabled in each DMAR Global
Command Register.  A consiquence of this is that when we switch from
x2apic mode back to xapic mode, and disable interrupt remapping for
the kdump kernel, interrupts passing through the IO APICs are in
x2apic format as opposed xapic.  This causes a triple fault in the
kexec kernel.

As EIM is explicitly set up each time Interrup Remapping is enabled,
it is safe for us to clobber this when taring down.

Also, change the header definition of IRTA_REG_EIME_SHIFT.  It caused
verbose and error-prone code, and was only used in 1 place before.  We
now have IRTA_EIME which is the specific bit in the register.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/passthrough/vtd/intremap.c
xen/drivers/passthrough/vtd/iommu.h